In [1]:
def RunEda():
import time
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ImportBib.py")
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigINI2025.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigJson2025.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsniDef.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsNiDefFa2.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\EDA-Report2025.py")
import time
time.sleep(5.0)
return f"assets/RunEDA-Report.html"
def RunML():
import time
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ImportBib.py")
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigINI2025.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigJson2025.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsniDef.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsNiDefFa2.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ML-Reports2025.py")
import time
time.sleep(5.0)
return f"assets/Asni2025Execfile.html"
RunML()
C:\Users\satur\anaconda3\Lib\site-packages\pandas\core\arrays\masked.py:60: UserWarning: Pandas requires version '1.3.6' or newer of 'bottleneck' (version '1.3.5' currently installed). from pandas.core import (
Programm Start: 2025-02-17 09:21:18
Section: path
Options: ['dirpr', 'dirdata', 'dirassets', 'dirimage', 'dirimagenow', 'dirtemplate', 'ineda_file', 'ineda', 'reporteda', 'reportedar', 'rreporttest', 'reportall', 'excel_filename', 'config_json', 'eda_json', 'tabdoc']
dirpr = C:\IPYNBgesamt2025\AsFenForum2025
dirdata = C:\IPYNBgesamt2025\AsFenForum2025\data
dirassets = C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
dirimage = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirimagenow = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirtemplate = C:\IPYNBgesamt2025\AsFenForum2025\Templates
ineda_file = C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda = C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar = C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
rreporttest = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
reportall = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
excel_filename = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
config_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
eda_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
tabdoc = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
-----------------------------------
DirPr: C:\IPYNBgesamt2025\AsFenForum2025
pfad: C:\IPYNBgesamt2025\AsFenForum2025\data
pathIm: C:\IPYNBgesamt2025\AsFenForum2025\Image
EDA_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
config_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
ineda_file: C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda: C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar: C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
reportall: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
tabdoc: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
DirTemplate: C:\IPYNBgesamt2025\AsFenForum2025\Templates
DirImage: C:\IPYNBgesamt2025\AsFenForum2025\Image
DirAssets: C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
excel_filename: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
rReportTest: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
csv-file: C:\IPYNBgesamt2025\AsFenForum2025\data\heart.csv
-----------------------------------
Start AsNiDefFa2.py!
Finish AsNiDefFa2.py!
C:\IPYNBgesamt2025\AsFenForum2025
{'class 0': {'precision': 0.8280254777070064, 'recall': 0.7878787878787878, 'f1-score': 0.8074534161490684, 'support': 165}, 'class 1': {'precision': 0.8333333333333334, 'recall': 0.8663366336633663, 'f1-score': 0.8495145631067962, 'support': 202}, 'accuracy': 0.8310626702997275, 'macro avg': {'precision': 0.8306794055201698, 'recall': 0.8271077107710771, 'f1-score': 0.8284839896279323, 'support': 367}, 'weighted avg': {'precision': 0.8309469677247667, 'recall': 0.8310626702997275, 'f1-score': 0.8306042381802973, 'support': 367}}
precision recall f1-score support
class 0 0.828025 0.787879 0.807453 165.000000
class 1 0.833333 0.866337 0.849515 202.000000
accuracy 0.831063 0.831063 0.831063 0.831063
macro avg 0.830679 0.827108 0.828484 367.000000
weighted avg 0.830947 0.831063 0.830604 367.000000
<Figure size 100x100 with 0 Axes>
{'class 0': {'precision': 0.8280254777070064, 'recall': 0.7878787878787878, 'f1-score': 0.8074534161490684, 'support': 165}, 'class 1': {'precision': 0.8333333333333334, 'recall': 0.8663366336633663, 'f1-score': 0.8495145631067962, 'support': 202}, 'accuracy': 0.8310626702997275, 'macro avg': {'precision': 0.8306794055201698, 'recall': 0.8271077107710771, 'f1-score': 0.8284839896279323, 'support': 367}, 'weighted avg': {'precision': 0.8309469677247667, 'recall': 0.8310626702997275, 'f1-score': 0.8306042381802973, 'support': 367}}
precision recall f1-score support
class 0 0.828025 0.787879 0.807453 165.000000
class 1 0.833333 0.866337 0.849515 202.000000
accuracy 0.831063 0.831063 0.831063 0.831063
macro avg 0.830679 0.827108 0.828484 367.000000
weighted avg 0.830947 0.831063 0.830604 367.000000
{'class 0': {'precision': 0.6904761904761905, 'recall': 0.5272727272727272, 'f1-score': 0.5979381443298969, 'support': 165}, 'class 1': {'precision': 0.6763485477178424, 'recall': 0.806930693069307, 'f1-score': 0.7358916478555305, 'support': 202}, 'accuracy': 0.6811989100817438, 'macro avg': {'precision': 0.6834123690970164, 'recall': 0.667101710171017, 'f1-score': 0.6669148960927137, 'support': 367}, 'weighted avg': {'precision': 0.6827002127181897, 'recall': 0.6811989100817438, 'f1-score': 0.6738689555347416, 'support': 367}}
precision recall f1-score support
class 0 0.690476 0.527273 0.597938 165.000000
class 1 0.676349 0.806931 0.735892 202.000000
accuracy 0.681199 0.681199 0.681199 0.681199
macro avg 0.683412 0.667102 0.666915 367.000000
weighted avg 0.682700 0.681199 0.673869 367.000000
{'class 0': {'precision': 0.0, 'recall': 0.0, 'f1-score': 0.0, 'support': 165}, 'class 1': {'precision': 0.5504087193460491, 'recall': 1.0, 'f1-score': 0.710017574692443, 'support': 202}, 'accuracy': 0.5504087193460491, 'macro avg': {'precision': 0.27520435967302453, 'recall': 0.5, 'f1-score': 0.3550087873462215, 'support': 367}, 'weighted avg': {'precision': 0.30294975833215776, 'recall': 0.5504087193460491, 'f1-score': 0.3907998639996553, 'support': 367}}
precision recall f1-score support
class 0 0.000000 0.000000 0.000000 165.000000
class 1 0.550409 1.000000 0.710018 202.000000
accuracy 0.550409 0.550409 0.550409 0.550409
macro avg 0.275204 0.500000 0.355009 367.000000
weighted avg 0.302950 0.550409 0.390800 367.000000
{'class 0': {'precision': 0.0, 'recall': 0.0, 'f1-score': 0.0, 'support': 165}, 'class 1': {'precision': 0.5504087193460491, 'recall': 1.0, 'f1-score': 0.710017574692443, 'support': 202}, 'accuracy': 0.5504087193460491, 'macro avg': {'precision': 0.27520435967302453, 'recall': 0.5, 'f1-score': 0.3550087873462215, 'support': 367}, 'weighted avg': {'precision': 0.30294975833215776, 'recall': 0.5504087193460491, 'f1-score': 0.3907998639996553, 'support': 367}}
precision recall f1-score support
class 0 0.000000 0.000000 0.000000 165.000000
class 1 0.550409 1.000000 0.710018 202.000000
accuracy 0.550409 0.550409 0.550409 0.550409
macro avg 0.275204 0.500000 0.355009 367.000000
weighted avg 0.302950 0.550409 0.390800 367.000000
{'class 0': {'precision': 0.7485029940119761, 'recall': 0.7575757575757576, 'f1-score': 0.7530120481927711, 'support': 165}, 'class 1': {'precision': 0.8, 'recall': 0.7920792079207921, 'f1-score': 0.7960199004975126, 'support': 202}, 'accuracy': 0.776566757493188, 'macro avg': {'precision': 0.774251497005988, 'recall': 0.7748274827482748, 'f1-score': 0.7745159743451419, 'support': 367}, 'weighted avg': {'precision': 0.7768473951280002, 'recall': 0.776566757493188, 'f1-score': 0.776683945101648, 'support': 367}}
precision recall f1-score support
class 0 0.748503 0.757576 0.753012 165.000000
class 1 0.800000 0.792079 0.796020 202.000000
accuracy 0.776567 0.776567 0.776567 0.776567
macro avg 0.774251 0.774827 0.774516 367.000000
weighted avg 0.776847 0.776567 0.776684 367.000000
{'class 0': {'precision': 0.5047021943573667, 'recall': 0.9757575757575757, 'f1-score': 0.6652892561983471, 'support': 165}, 'class 1': {'precision': 0.9166666666666666, 'recall': 0.21782178217821782, 'f1-score': 0.352, 'support': 202}, 'accuracy': 0.55858310626703, 'macro avg': {'precision': 0.7106844305120167, 'recall': 0.5967896789678968, 'f1-score': 0.5086446280991735, 'support': 367}, 'weighted avg': {'precision': 0.7314510319771993, 'recall': 0.55858310626703, 'f1-score': 0.4928521179093387, 'support': 367}}
precision recall f1-score support
class 0 0.504702 0.975758 0.665289 165.000000
class 1 0.916667 0.217822 0.352000 202.000000
accuracy 0.558583 0.558583 0.558583 0.558583
macro avg 0.710684 0.596790 0.508645 367.000000
weighted avg 0.731451 0.558583 0.492852 367.000000
{'class 0': {'precision': 0.8625, 'recall': 0.8363636363636363, 'f1-score': 0.8492307692307692, 'support': 165}, 'class 1': {'precision': 0.8695652173913043, 'recall': 0.8910891089108911, 'f1-score': 0.8801955990220048, 'support': 202}, 'accuracy': 0.8664850136239782, 'macro avg': {'precision': 0.8660326086956522, 'recall': 0.8637263726372637, 'f1-score': 0.8647131841263871, 'support': 367}, 'weighted avg': {'precision': 0.8663887572562493, 'recall': 0.8664850136239782, 'f1-score': 0.8662740815409316, 'support': 367}}
precision recall f1-score support
class 0 0.862500 0.836364 0.849231 165.000000
class 1 0.869565 0.891089 0.880196 202.000000
accuracy 0.866485 0.866485 0.866485 0.866485
macro avg 0.866033 0.863726 0.864713 367.000000
weighted avg 0.866389 0.866485 0.866274 367.000000
{'class 0': {'precision': 0.8466257668711656, 'recall': 0.8363636363636363, 'f1-score': 0.8414634146341462, 'support': 165}, 'class 1': {'precision': 0.8676470588235294, 'recall': 0.8762376237623762, 'f1-score': 0.87192118226601, 'support': 202}, 'accuracy': 0.8583106267029973, 'macro avg': {'precision': 0.8571364128473475, 'recall': 0.8563006300630063, 'f1-score': 0.8566922984500781, 'support': 367}, 'weighted avg': {'precision': 0.8581960692536655, 'recall': 0.8583106267029973, 'f1-score': 0.8582276355105399, 'support': 367}}
precision recall f1-score support
class 0 0.846626 0.836364 0.841463 165.000000
class 1 0.867647 0.876238 0.871921 202.000000
accuracy 0.858311 0.858311 0.858311 0.858311
macro avg 0.857136 0.856301 0.856692 367.000000
weighted avg 0.858196 0.858311 0.858228 367.000000
{'class 0': {'precision': 0.8353658536585366, 'recall': 0.8303030303030303, 'f1-score': 0.8328267477203648, 'support': 165}, 'class 1': {'precision': 0.8620689655172413, 'recall': 0.8663366336633663, 'f1-score': 0.8641975308641974, 'support': 202}, 'accuracy': 0.8501362397820164, 'macro avg': {'precision': 0.8487174095878889, 'recall': 0.8483198319831984, 'f1-score': 0.8485121392922811, 'support': 367}, 'weighted avg': {'precision': 0.8500634792592406, 'recall': 0.8501362397820164, 'f1-score': 0.8500935002954443, 'support': 367}}
precision recall f1-score support
class 0 0.835366 0.830303 0.832827 165.000000
class 1 0.862069 0.866337 0.864198 202.000000
accuracy 0.850136 0.850136 0.850136 0.850136
macro avg 0.848717 0.848320 0.848512 367.000000
weighted avg 0.850063 0.850136 0.850094 367.000000
{'class 0': {'precision': 0.8553459119496856, 'recall': 0.8242424242424242, 'f1-score': 0.8395061728395062, 'support': 165}, 'class 1': {'precision': 0.8605769230769231, 'recall': 0.8861386138613861, 'f1-score': 0.8731707317073171, 'support': 202}, 'accuracy': 0.8583106267029973, 'macro avg': {'precision': 0.8579614175133043, 'recall': 0.8551905190519051, 'f1-score': 0.8563384522734117, 'support': 367}, 'weighted avg': {'precision': 0.8582251060851134, 'recall': 0.8583106267029973, 'f1-score': 0.8580354395732877, 'support': 367}}
precision recall f1-score support
class 0 0.855346 0.824242 0.839506 165.000000
class 1 0.860577 0.886139 0.873171 202.000000
accuracy 0.858311 0.858311 0.858311 0.858311
macro avg 0.857961 0.855191 0.856338 367.000000
weighted avg 0.858225 0.858311 0.858035 367.000000
{'class 0': {'precision': 0.625, 'recall': 0.6060606060606061, 'f1-score': 0.6153846153846154, 'support': 165}, 'class 1': {'precision': 0.6859903381642513, 'recall': 0.7029702970297029, 'f1-score': 0.6943765281173594, 'support': 202}, 'accuracy': 0.659400544959128, 'macro avg': {'precision': 0.6554951690821256, 'recall': 0.6545154515451546, 'f1-score': 0.6548805717509874, 'support': 367}, 'weighted avg': {'precision': 0.658569613921468, 'recall': 0.659400544959128, 'f1-score': 0.6588624529105399, 'support': 367}}
precision recall f1-score support
class 0 0.625000 0.606061 0.615385 165.000000
class 1 0.685990 0.702970 0.694377 202.000000
accuracy 0.659401 0.659401 0.659401 0.659401
macro avg 0.655495 0.654515 0.654881 367.000000
weighted avg 0.658570 0.659401 0.658862 367.000000
{'class 0': {'precision': 0.7619047619047619, 'recall': 0.7757575757575758, 'f1-score': 0.7687687687687688, 'support': 165}, 'class 1': {'precision': 0.8140703517587939, 'recall': 0.801980198019802, 'f1-score': 0.8079800498753117, 'support': 202}, 'accuracy': 0.7901907356948229, 'macro avg': {'precision': 0.7879875568317779, 'recall': 0.7888688868886888, 'f1-score': 0.7883744093220402, 'support': 367}, 'weighted avg': {'precision': 0.7906171574102508, 'recall': 0.7901907356948229, 'f1-score': 0.790350999786539, 'support': 367}}
precision recall f1-score support
class 0 0.761905 0.775758 0.768769 165.000000
class 1 0.814070 0.801980 0.807980 202.000000
accuracy 0.790191 0.790191 0.790191 0.790191
macro avg 0.787988 0.788869 0.788374 367.000000
weighted avg 0.790617 0.790191 0.790351 367.000000
{'class 0': {'precision': 0.8383233532934131, 'recall': 0.8484848484848485, 'f1-score': 0.8433734939759034, 'support': 165}, 'class 1': {'precision': 0.875, 'recall': 0.8663366336633663, 'f1-score': 0.8706467661691543, 'support': 202}, 'accuracy': 0.8583106267029973, 'macro avg': {'precision': 0.8566616766467066, 'recall': 0.8574107410741074, 'f1-score': 0.8570101300725288, 'support': 367}, 'weighted avg': {'precision': 0.8585104994370931, 'recall': 0.8583106267029973, 'f1-score': 0.8583849407961668, 'support': 367}}
precision recall f1-score support
class 0 0.838323 0.848485 0.843373 165.000000
class 1 0.875000 0.866337 0.870647 202.000000
accuracy 0.858311 0.858311 0.858311 0.858311
macro avg 0.856662 0.857411 0.857010 367.000000
weighted avg 0.858510 0.858311 0.858385 367.000000
{'class 0': {'precision': 0.8106508875739645, 'recall': 0.8303030303030303, 'f1-score': 0.8203592814371257, 'support': 165}, 'class 1': {'precision': 0.8585858585858586, 'recall': 0.8415841584158416, 'f1-score': 0.85, 'support': 202}, 'accuracy': 0.8365122615803815, 'macro avg': {'precision': 0.8346183730799115, 'recall': 0.835943594359436, 'f1-score': 0.8351796407185628, 'support': 367}, 'weighted avg': {'precision': 0.8370347135805112, 'recall': 0.8365122615803815, 'f1-score': 0.836673791381814, 'support': 367}}
precision recall f1-score support
class 0 0.810651 0.830303 0.820359 165.000000
class 1 0.858586 0.841584 0.850000 202.000000
accuracy 0.836512 0.836512 0.836512 0.836512
macro avg 0.834618 0.835944 0.835180 367.000000
weighted avg 0.837035 0.836512 0.836674 367.000000
{'class 0': {'precision': 0.7705882352941177, 'recall': 0.793939393939394, 'f1-score': 0.782089552238806, 'support': 165}, 'class 1': {'precision': 0.8274111675126904, 'recall': 0.806930693069307, 'f1-score': 0.8170426065162908, 'support': 202}, 'accuracy': 0.8010899182561307, 'macro avg': {'precision': 0.798999701403404, 'recall': 0.8004350435043505, 'f1-score': 0.7995660793775484, 'support': 367}, 'weighted avg': {'precision': 0.8018640726460297, 'recall': 0.8010899182561307, 'f1-score': 0.8013280180809094, 'support': 367}}
precision recall f1-score support
class 0 0.770588 0.793939 0.782090 165.00000
class 1 0.827411 0.806931 0.817043 202.00000
accuracy 0.801090 0.801090 0.801090 0.80109
macro avg 0.799000 0.800435 0.799566 367.00000
weighted avg 0.801864 0.801090 0.801328 367.00000
{'class 0': {'precision': 0.8253012048192772, 'recall': 0.8303030303030303, 'f1-score': 0.8277945619335347, 'support': 165}, 'class 1': {'precision': 0.8606965174129353, 'recall': 0.8564356435643564, 'f1-score': 0.8585607940446649, 'support': 202}, 'accuracy': 0.8446866485013624, 'macro avg': {'precision': 0.8429988611161062, 'recall': 0.8433693369336934, 'f1-score': 0.8431776779890998, 'support': 367}, 'weighted avg': {'precision': 0.8447830934948056, 'recall': 0.8446866485013624, 'f1-score': 0.8447285643489252, 'support': 367}}
precision recall f1-score support
class 0 0.825301 0.830303 0.827795 165.000000
class 1 0.860697 0.856436 0.858561 202.000000
accuracy 0.844687 0.844687 0.844687 0.844687
macro avg 0.842999 0.843369 0.843178 367.000000
weighted avg 0.844783 0.844687 0.844729 367.000000
{'class 0': {'precision': 0.0, 'recall': 0.0, 'f1-score': 0.0, 'support': 165}, 'class 1': {'precision': 0.5504087193460491, 'recall': 1.0, 'f1-score': 0.710017574692443, 'support': 202}, 'accuracy': 0.5504087193460491, 'macro avg': {'precision': 0.27520435967302453, 'recall': 0.5, 'f1-score': 0.3550087873462215, 'support': 367}, 'weighted avg': {'precision': 0.30294975833215776, 'recall': 0.5504087193460491, 'f1-score': 0.3907998639996553, 'support': 367}}
precision recall f1-score support
class 0 0.000000 0.000000 0.000000 165.000000
class 1 0.550409 1.000000 0.710018 202.000000
accuracy 0.550409 0.550409 0.550409 0.550409
macro avg 0.275204 0.500000 0.355009 367.000000
weighted avg 0.302950 0.550409 0.390800 367.000000
models_best RT1 Model r2_score_Train r2_score_Test acc_Train \
5 Decision Tree Classifier 1 100.00 100.00 100.00
12 DecisionTreeClassifier 2 100.00 100.00 100.00
14 XGBClassifier 100.00 100.00 100.00
15 AdaBoostClassifier 2 100.00 100.00 100.00
13 RandomForestClassifier 96.29 100.00 99.09
8 BaggingClassifier 96.29 96.36 99.09
10 GradientBoostingClassifie 87.00 81.81 96.82
acc_Test acc_Diff rmse_Train rmse_Test re_Train re_Test
5 100.00 0.00 0.00 0.00 0.00 0.00
12 100.00 0.00 0.00 0.00 0.00 0.00
14 100.00 0.00 0.00 0.00 0.00 0.00
15 100.00 0.00 0.00 0.00 0.00 0.00
13 100.00 -0.91 9.53 0.00 1.59 0.00
8 99.09 0.00 9.53 9.53 1.59 1.85
10 95.45 1.37 17.84 21.32 5.56 9.26
-------------------------------------------------------------------------
sort_pred RT2 Model r2_score_train acc_train rmse_train \
13 RandomForestClassifier 100.00 100.00 0.00
5 Decision Tree Classifier 1 100.00 100.00 0.00
12 DecisionTreeClassifier 2 100.00 100.00 0.00
8 BaggingClassifier 93.37 98.36 12.79
10 GradientBoostingClassifie 86.00 96.55 18.59
14 XGBClassifier 57.28 89.45 32.47
9 AdaBoostClassifier 1 53.59 88.55 33.84
15 AdaBoostClassifier 2 53.59 88.55 33.84
0 Linear Regression 37.39 84.55 39.31
1 Logistic Regression 37.39 84.55 39.31
7 RidgeClassifier 37.39 84.55 39.31
11 KNeighborsClassifier 12.34 78.36 46.51
2 Perceptron -10.50 72.73 52.22
3 Linear SVC -75.32 56.73 65.78
6 Stochastic Gradient Decent -79.74 55.64 66.61
4 MLPClassifier -79.74 55.64 66.61
16 SVC -79.74 55.64 66.61
re_train
13 0.00
5 0.00
12 0.00
8 2.94
10 6.21
14 18.95
9 20.59
15 20.59
0 27.78
1 27.78
7 27.78
11 38.89
2 49.02
3 77.78
6 79.74
4 79.74
16 79.74
-------------------------------------------------------------------------
models_pred RT3 Model r2_score_train acc_train rmse_train \
0 Linear Regression 37.39 84.55 39.31
1 Logistic Regression 37.39 84.55 39.31
2 Perceptron -10.50 72.73 52.22
3 Linear SVC -75.32 56.73 65.78
4 MLPClassifier -79.74 55.64 66.61
5 Decision Tree Classifier 1 100.00 100.00 0.00
6 Stochastic Gradient Decent -79.74 55.64 66.61
7 RidgeClassifier 37.39 84.55 39.31
8 BaggingClassifier 93.37 98.36 12.79
9 AdaBoostClassifier 1 53.59 88.55 33.84
10 GradientBoostingClassifie 86.00 96.55 18.59
11 KNeighborsClassifier 12.34 78.36 46.51
12 DecisionTreeClassifier 2 100.00 100.00 0.00
13 RandomForestClassifier 100.00 100.00 0.00
14 XGBClassifier 57.28 89.45 32.47
15 AdaBoostClassifier 2 53.59 88.55 33.84
16 SVC -79.74 55.64 66.61
re_train
0 27.78
1 27.78
2 49.02
3 77.78
4 79.74
5 0.00
6 79.74
7 27.78
8 2.94
9 20.59
10 6.21
11 38.89
12 0.00
13 0.00
14 18.95
15 20.59
16 79.74
-------------------------------------------------------------------------
models_pred RT4 0 1 2 3 4 5 6 7 8 9 10 11 \
0 41.90 41.90 -69.15 14.69 -80.92 100.00 -2.23 49.25 94.85 47.78 87.50 35.28
1 85.64 85.64 58.18 78.91 55.27 100.00 74.73 87.45 98.73 87.09 96.91 84.00
2 37.90 37.90 64.67 45.92 66.88 0.00 50.27 35.42 11.28 35.93 17.58 40.00
3 25.99 25.99 75.66 38.16 80.92 0.00 45.72 22.70 2.30 23.36 5.59 28.95
12 13 14 15 16
0 100.00 100.00 67.64 47.78 -80.92
1 100.00 100.00 92.00 87.09 55.27
2 0.00 0.00 28.28 35.93 66.88
3 0.00 0.00 14.47 23.36 80.92
Programm Start: 17.02.2025 09:21:27
Programm Finish: 17.02.2025 09:22:23
Общее время работы программы составляет: 00:0:56
Out[1]:
'assets/Asni2025Execfile.html'
In [ ]:
Kardio="""
## Data science проект: Практическое применение Автоматизированной системы научных исследований в медицине, здравоохранении и смежных областях
## Тема исследования: Анализа факторов риска сердечно сосудистых заболеваний и прогноз исходов лечения при помощи методов Машинного Обучения
## Старт программных модулей для установки библиотек и конфигурационных параметров системы:
print("Execfile ImportBib.py")
import time
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ImportBib.py")
time.sleep(2.0)
print("Execfile ConfigINI.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigINI2025.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigJson2025.py")
import time
time.sleep(2.0)
print("Execfile ConfigJson2025.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsniDef.py")
import time
time.sleep(2.0)
print("Execfile AsniDef.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsNiDefFa2.py")
import time
time.sleep(2.0)
print("Execfile AsNiDefFa2.py")
## Лог-протокол работы вызванных программных модулей:
### Присвоение параметров в файле конфигурации ProPath.ini
Execfile ImportBib.py
Programm Start: 2025-02-13 05:58:13
Section: path
Options: ['dirpr', 'dirdata', 'dirassets', 'dirimage', 'dirimagenow', 'dirtemplate', 'ineda_file', 'ineda', 'reporteda', 'reportedar', 'rreporttest', 'reportall', 'excel_filename', 'config_json', 'eda_json', 'tabdoc']
dirpr = C:\IPYNBgesamt2025\AsFenForum2025
dirdata = C:\IPYNBgesamt2025\AsFenForum2025\data
dirassets = C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
dirimage = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirimagenow = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirtemplate = C:\IPYNBgesamt2025\AsFenForum2025\Templates
ineda_file = C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda = C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar = C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
rreporttest = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
reportall = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
excel_filename = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
config_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
eda_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
tabdoc = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
## Результаты работы модуля ConfigINI2025.py со значениями параметров, переданных в систему:
-----------------------------------
DirPr: C:\IPYNBgesamt2025\AsFenForum2025
pfad: C:\IPYNBgesamt2025\AsFenForum2025\data
pathIm: C:\IPYNBgesamt2025\AsFenForum2025\Image
EDA_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
config_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
ineda_file: C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda: C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar: C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
reportall: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
tabdoc: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
DirTemplate: C:\IPYNBgesamt2025\AsFenForum2025\Templates
DirImage: C:\IPYNBgesamt2025\AsFenForum2025\Image
DirAssets: C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
excel_filename: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
rReportTest: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
csv-file: C:\IPYNBgesamt2025\AsFenForum2025\data\heart.csv
## Сообщение в лог-протоколе о отработанных программных модулях:
-----------------------------------
Execfile ConfigINI.py
Execfile ConfigJson2025.py
Execfile AsniDef.py
Start AsNiDefFa2.py!
Finish AsNiDefFa2.py!
Execfile AsNiDefFa2.py
* После завершения работы модулей система подготовлена для проведения Анализа избранных проектов. Для этого необходимо нажать планку "Старт программ избранных проектов" и выбрать один из модулей анализа
"""
Diabet="""
## Data science проект: Практическое применение Автоматизированной системы научных исследований в медицине, здравоохранении и смежных областях
## Тема исследования: Анализа факторов риска заболевания диабетом и прогноз исходов лечения при помощи методов Машинного Обучения
## Старт программных модулей для установки библиотек и конфигурационных параметров системы:
print("Execfile ImportBib.py")
import time
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ImportBib.py")
time.sleep(2.0)
print("Execfile ConfigINI.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigINI2025.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigJson2025.py")
import time
time.sleep(2.0)
print("Execfile ConfigJson2025.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsniDef.py")
import time
time.sleep(2.0)
print("Execfile AsniDef.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsNiDefFa2.py")
import time
time.sleep(2.0)
print("Execfile AsNiDefFa2.py")
## Лог-протокол работы вызванных программных модулей:
### Присвоение параметров в файле конфигурации ProPath.ini
Execfile ImportBib.py
Programm Start: 2025-02-13 05:58:13
Section: path
Options: ['dirpr', 'dirdata', 'dirassets', 'dirimage', 'dirimagenow', 'dirtemplate', 'ineda_file', 'ineda', 'reporteda', 'reportedar', 'rreporttest', 'reportall', 'excel_filename', 'config_json', 'eda_json', 'tabdoc']
dirpr = C:\IPYNBgesamt2025\AsFenForum2025
dirdata = C:\IPYNBgesamt2025\AsFenForum2025\data
dirassets = C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
dirimage = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirimagenow = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirtemplate = C:\IPYNBgesamt2025\AsFenForum2025\Templates
ineda_file = C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda = C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar = C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
rreporttest = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
reportall = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
excel_filename = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
config_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
eda_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
tabdoc = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
## Результаты работы модуля ConfigINI2025.py со значениями параметров, переданных в систему:
-----------------------------------
DirPr: C:\IPYNBgesamt2025\AsFenForum2025
pfad: C:\IPYNBgesamt2025\AsFenForum2025\data
pathIm: C:\IPYNBgesamt2025\AsFenForum2025\Image
EDA_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
config_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
ineda_file: C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda: C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar: C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
reportall: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
tabdoc: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
DirTemplate: C:\IPYNBgesamt2025\AsFenForum2025\Templates
DirImage: C:\IPYNBgesamt2025\AsFenForum2025\Image
DirAssets: C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
excel_filename: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
rReportTest: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
csv-file: C:\IPYNBgesamt2025\AsFenForum2025\data\heart.csv
## Сообщение в лог-протоколе о отработанных программных модулях:
-----------------------------------
Execfile ConfigINI.py
Execfile ConfigJson2025.py
Execfile AsniDef.py
Start AsNiDefFa2.py!
Finish AsNiDefFa2.py!
Execfile AsNiDefFa2.py
* После завершения работы модулей система подготовлена для проведения Анализа избранных проектов. Для этого необходимо нажать планку "Старт программ избранных проектов" и выбрать один из модулей анализа
"""
Genikol = """
## Data science проект: Практическое применение Автоматизированной системы научных исследований в медицине, здравоохранении и смежных областях
## Тема исследования: Анализа факторов риска заболеваний женской молочной железы и прогноз исходов лечения при помощи методов Машинного Обучения
## Старт программных модулей для установки библиотек и конфигурационных параметров системы:
print("Execfile ImportBib.py")
import time
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ImportBib.py")
time.sleep(2.0)
print("Execfile ConfigINI.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigINI2025.py")
import time
time.sleep(2.0)
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ConfigJson2025.py")
import time
time.sleep(2.0)
print("Execfile ConfigJson2025.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsniDef.py")
import time
time.sleep(2.0)
print("Execfile AsniDef.py")
execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\AsNiDefFa2.py")
import time
time.sleep(2.0)
print("Execfile AsNiDefFa2.py")
## Лог-протокол работы вызванных программных модулей:
### Присвоение параметров в файле конфигурации ProPath.ini
Execfile ImportBib.py
Programm Start: 2025-02-13 05:58:13
Section: path
Options: ['dirpr', 'dirdata', 'dirassets', 'dirimage', 'dirimagenow', 'dirtemplate', 'ineda_file', 'ineda', 'reporteda', 'reportedar', 'rreporttest', 'reportall', 'excel_filename', 'config_json', 'eda_json', 'tabdoc']
dirpr = C:\IPYNBgesamt2025\AsFenForum2025
dirdata = C:\IPYNBgesamt2025\AsFenForum2025\data
dirassets = C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
dirimage = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirimagenow = C:\IPYNBgesamt2025\AsFenForum2025\Image
dirtemplate = C:\IPYNBgesamt2025\AsFenForum2025\Templates
ineda_file = C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda = C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar = C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
rreporttest = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
reportall = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
excel_filename = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
config_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
eda_json = C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
tabdoc = C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
## Результаты работы модуля ConfigINI2025.py со значениями параметров, переданных в систему:
-----------------------------------
DirPr: C:\IPYNBgesamt2025\AsFenForum2025
pfad: C:\IPYNBgesamt2025\AsFenForum2025\data
pathIm: C:\IPYNBgesamt2025\AsFenForum2025\Image
EDA_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\EDA2025.json
config_json: C:\IPYNBgesamt2025\AsFenForum2025\Templates\ASNIR.json
ineda_file: C:\IPYNBgesamt2025\AsFenForum2025\Templates\TemplateTOC1.docx
ineda: C:\IPYNBgesamt2025\AsFenForum2025\data\InEDA.docx
reporteda: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportEDA.docx
reportedar: C:\IPYNBgesamt2025\AsFenForum2025\data\Kap3.docx
reportall: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT-RESSOURCE\ReportReportAll.docx
tabdoc: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report.DOCX
DirTemplate: C:\IPYNBgesamt2025\AsFenForum2025\Templates
DirImage: C:\IPYNBgesamt2025\AsFenForum2025\Image
DirAssets: C:\IPYNBgesamt2025\AsFenForum2025\ASSETS
excel_filename: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\EDA-Report5.xlsx
rReportTest: C:\IPYNBgesamt2025\AsFenForum2025\OUTPUT\TReportTest.docx
csv-file: C:\IPYNBgesamt2025\AsFenForum2025\data\heart.csv
## Сообщение в лог-протоколе о отработанных программных модулях:
-----------------------------------
Execfile ConfigINI.py
Execfile ConfigJson2025.py
Execfile AsniDef.py
Start AsNiDefFa2.py!
Finish AsNiDefFa2.py!
Execfile AsNiDefFa2.py
* После завершения работы модулей система подготовлена для проведения Анализа избранных проектов. Для этого необходимо нажать планку "Старт программ избранных проектов" и выбрать один из модулей анализа
"""
In [ ]:
#;;*****************************************************************;;;
#;;*****************************************************************;;;
#;;;****************************************************************;;;
#;;;*** FIRMA : PARADOX ***;;;
#;;;*** Autor : Alexander Wagner ***;;;
#;;;*** STUDIEN-NAME : AsNiFen ***;;;
#;;;*** STUDIEN-NUMMER : ***;;;
#;;;*** SPONSOR : ***;;;
#;;;*** ARBEITSBEGIN : 01.11.2023 ***;;;
#;;;****************************************************************;;;
#;;;*--------------------------------------------------------------*;;;
#;;;*--- PROGRAMM : Asni2025-V06.ipynb ---*;;;
#;;;*--- Parent : Asni2025-V05.ipynb ---*;;;
#;;;*--- BESCHREIBUNG : System ---*;;;
#;;;*--- : ---*;;;
#;;;*--- : ---*;;;
#;;;*--- VERSION VOM : 17.02.2025 ---*;;;
#;;;*-- KORREKTUR VOM : ---*;;;
#;;;*-- : ---*;;;
#;;;*--- INPUT :.INI, .Json, .CSV ---*;;;
#;;;*--- OUTPUT : ---*;;;
#;;;*--------------------------------------------------------------*;;;
#;;;************************ Änderung ******************************;;;
#;;;****************************************************************;;;
#;;; Wann : Was *;;;
#;;;*--------------------------------------------------------------*;;;
#;;;* 17.02.2025 : Старт Модулей *;;;
#;;;* : *;;;
#;;;****************************************************************;;;
import dash
import dash_bootstrap_components as dbc
from dash import Input, Output, dcc, html
import pandas as pd
import numpy as np
import sqlite3
import dash
from dash import dash_table
from dash import dcc
from dash import html
import dash_bootstrap_components as dbc
import dash_html_components as html
from dash.dependencies import Input, Output
from dash import Dash, dcc, html, Input, Output, State, callback
import plotly.express as px
import plotly.graph_objects as go
import chart_studio.plotly as py
from jupyter_dash import JupyterDash
import flask
import json
import requests
from urllib.request import urlopen
from prophet import Prophet
from pandas_datareader import data, wb
import base64
import os, sys, inspect, time, datetime
import subprocess
import json
from time import time, strftime, localtime
from datetime import timedelta
import shutil
import os
import pandas as pd
from configparser import ConfigParser
import streamlit as st
import matplotlib.pyplot as plt
from IPython.display import IFrame
from dash import Dash, dcc, html, callback, Input, Output
import dash_bootstrap_components as dbc
import plotly.express as px
import dash_ag_grid as dag
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import StandardScaler, LabelEncoder
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import time
header_height, footer_height = "2rem", "10rem"
sidebar_width, adbar_width = "12rem", "12rem"
HEADER_STYLE = {
"position": "fixed",
"top": 0,
"left": 0,
"right": 0,
"height": header_height,
"padding": "2rem 1rem",
"background-color": "white",
}
SIDEBAR_STYLE = {
"position": "fixed",
"top": header_height,
"left": 0,
"bottom": footer_height,
"width": sidebar_width,
"padding": "1rem 1rem",
"background-color": "lightgreen",
}
ADBAR_STYLE = {
"position": "fixed",
"top": header_height,
"right": 0,
"bottom": footer_height,
"width": adbar_width,
"padding": "1rem 1rem",
"background-color": "lightblue",
}
FOOTER_STYLE = {
"position": "fixed",
"bottom": 0,
"left": 0,
"right": 0,
"height": footer_height,
"padding": "1rem 1rem",
"background-color": "gray",
}
CONTENT_STYLE2 = {
"margin-top": header_height,
"margin-left": sidebar_width,
"margin-right": adbar_width,
"margin-bottom": footer_height,
"padding": "1rem 1rem",
}
CONTENT_STYLE = {
"margin-left": "8rem",
"margin-right": "2rem",
"padding": "2rem 1rem",
}
# the style arguments for the sidebar. We use position:fixed and a fixed width
SIDEBAR_STYLE2 = {
"position": "fixed",
"top": 0,
"left": 0,
"bottom": 0,
"width": "15rem",
"padding": "2rem 1rem",
"background-color": "#f8f9fa",
}
DocuList= ['Кардиология', 'Диабетология','Геникология']
header = html.Div([
html.H4("Республика Казахстан АСНИ-МЕД")], style=HEADER_STYLE
)
PLOTLY_LOGO = "https://images.plot.ly/logo/new-branding/plotly-logomark.png"
def b64_image(image_filename):
with open(image_filename, 'rb') as f:
image = f.read()
return 'data:image/png;base64,' + base64.b64encode(image).decode('utf-8')
#path="C:\\IPYNBgesamt2025\\ASNI-FEN-One\\Resource\\"
#File1=path +"ASNI-ReadME\\ArtikelList.md"
#File2=path +"MarkdownSample\\README05.md"
#File3=path +"MarkdownSample\\+Resume04.md"
#MdFile=path +"ASNI-ReadME\\AWresumeF.md"
#MdAW=path +"ASNI-ReadME\\AWresume2025.md"
#Front=path +"ASNI-ReadME\\FrontSeite.md"
#Asni=path +"ASNI-ReadME\\ASNIKonzept.md"
#TOC=path +"ASNI-ReadME\\TOC10+.md"
path="C:\\IPYNBgesamt2025\\AsFenForum2025\\ASSETS\\"
File1=path +"ArtikelList.md"
MdFile=path +"AWresumeF.md"
MdAW=path +"AWresume2025.md"
Front=path +"FrontSeite.md"
Asni=path +"ASNIKonzept.md"
TOC=path +"TOC10+.md"
File2=path +"README05.md"
File3=path +"+Resume04.md"
def demo_explanation(File):
# Markdown files
with open(File, "r", encoding="utf-8") as file:
demo_md = file.read()
return html.Div(
html.Div([dcc.Markdown(demo_md, className="markdown")]),
style={"margin": "20px"},
)
app = JupyterDash(external_stylesheets=[dbc.themes.SLATE])
sidebar = html.Div(
[
html.Div(
[
html.Img(src=PLOTLY_LOGO, style={"width": "3rem"}),
html.H2("Sidebar"),
],
className="sidebar-header",
),
html.Hr(),
dbc.Nav(
[
dbc.NavLink("Главная страница", href="/", active="exact"),
dbc.NavLink("Ввведение в ASNI-MED", href="/page-1", active="exact"),
dbc.NavLink("Разработчики системы", href="/page-5", active="exact"),
dbc.NavLink("Литература", href="/page-6", active="exact"),
dbc.NavLink("Старт проекта", href="/page-9", active="exact"),
dbc.NavLink("Старт программ избранных проектов", href="/page-8", active="exact"),
dbc.NavLink("Просмотр PDF-отчетов", href="/page-7", active="exact"),
dbc.NavLink("Старт обучающей системы", href="/page-10", active="exact"),
dbc.NavLink("Окончание работы", href="/page-11", active="exact"),
],
vertical=True,
pills=True,
),
],
style=SIDEBAR_STYLE,
)
dash._dash_renderer._set_react_version("18.2.0")
content = html.Div(id="page-content", style=CONTENT_STYLE)
app.title = "РК АСНИ-МЕД"
app.layout = html.Div([dcc.Location(id="url"), sidebar, content])
@app.callback(Output("page-content", "children"), [Input("url", "pathname")])
def render_page_content(pathname):
if pathname == "/":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: black; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<iframe src="/assets/FrontMed.jpg" height="873" width="1550" marginLeft=270 scrolling="yes"></iframe>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '900px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'background-color': 'black', 'marginLeft':50, 'vertical-align':'middle'},
className="four columns instruction",
))
])
elif pathname == "/page-1":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: lightblue; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<h1> Введение в Автоматизированную систему научных исследований в медицине "АСНИ-МЕД" </h1>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '70px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'vertical-align':'middle'},
className="four columns instruction",
)),
html.Div(
[html.Div(id="demo-explanation", children=[demo_explanation(Asni)])],
style={'width':'95.0%',"height": '1100px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'vertical-align':'middle'},
className="four columns instruction",
)
])
elif pathname == "/page-6":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: lightblue; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<h1> Список литературных источников "АСНИ-МЕД" </h1>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '70px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'vertical-align':'middle'},
className="four columns instruction",
)),
html.Div(
[html.Div(id="demo-explanation", children=[demo_explanation(File1)])],
style={'width':'95.0%',"height": '1100px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'vertical-align':'middle'},
className="four columns instruction",
)
])
elif pathname == "/page-5":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: lightblue; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<h1> Информация о разработчиках "АСНИ-МЕД" </h1>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '70px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'vertical-align':'middle'},
className="four columns instruction",
)),
html.Iframe(
id="my-output",
src="assets/Maksut.html",
style={'width':'99.5%',"height": '450px','display':'inline-block',
'backgroundColor': 'white',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'marginRight':1, 'vertical-align':'middle'},
className="four columns instruction",
),
html.Iframe(
id="my-output2",
src="assets/WagnerCV.html",
style={'width':'99.5%',"height": '550px','display':'inline-block',
'backgroundColor': 'white',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'marginRight':1, 'vertical-align':'middle'},
className="four columns instruction",
),
])
elif pathname == "/page-7":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: lightblue; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<h1> Выбор и просмотр PDF-файлов "АСНИ-МЕД" </h1>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '70px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':50, 'vertical-align':'middle'},
className="four columns instruction",
)),
html.Div(
html.Iframe(id="demo-explanation", src="http://localhost:8501", width=2600, height=1350),
style={'width':'99.5%',"height": '1200px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'backgroundColor': 'black',
'marginLeft':40, 'marginRight':1, 'vertical-align':'middle'},
className="four columns instruction",
)
]),
elif pathname == "/page-8":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: lightblue; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<h1> Запуск программ "АСНИ-МЕД" и визуализация результатов работы</h1>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '70px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':40, 'vertical-align':'middle'},
className="four columns instruction",
)),
###
###
html.Div([
html.Label(['Старт программы и визуализация отчёта'], style={'color': 'yellow', 'marginLeft':40}),
dcc.Dropdown(
id="input",
options=[
{"label": "ML-Report", "value": "C:\IPYNBgesamt2025\AsFenForum2025\ML-Reports2025.py"},
{"label": "EDA-Report", "value": "C:\IPYNBgesamt2025\AsFenForum2025\EDA-Report2025.py"},
{"label": "End-Report", "value": "C:\IPYNBgesamt2025\AsFenForum2025\ASNI-Reports2025.py"},
], #,value="C:\IPYNBgesamt2025\AsFenForum2025\EDA-Report2025.py", className="four columns instruction",
style={'width':'99.5%',"height": '40px',
'overflow-y':'auto', 'color': 'black', "font-size": "1.0rem",
'marginLeft':30, 'marginRight':1, 'vertical-align':'middle'},
),
html.Iframe(
id="my-output",
#src="assets/ASNI_ReportResult2025.html",
src=" ",
style={'width':'99.5%',"height": '700px','display':'inline-block',
'backgroundColor': 'white',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':40, 'marginRight':1, 'vertical-align':'middle'},
className="four columns instruction",
),
])
]),
elif pathname == "/page-2":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: lightblue; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<h1> Выберите параметры проекта для старта </h1>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '65px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':40, 'vertical-align':'middle'},
className="four columns instruction",
)),
html.Div([
dcc.Dropdown(
id="my-dropdown",
multi=False,
clearable=True,
disabled=False,
style={'display': True},
value="Кардио-проект",
options=[
{"label": "Кардио-проект", "value": "Кардио-проект"},
{"label": "Диабет-проект", "value": "Диабет-проект"},
{"label": "Инициативный-проект", "value": "Инициативный-проект"},
]),
],style={'width':'99.5%',"height": '40px', 'display':'inline-block',
'overflow-y':'auto', 'color': 'black', "font-size": "1.0rem",
'marginLeft':50, 'marginRight':1, 'vertical-align':'middle',
'marginBottom':0,'marginTop':0, 'padding': '1px 1px 1px 1px'}
),
html.Div([html.Div([dcc.Markdown(id="my-projekt", children=Md-File)],
style={"font-size": "1.4rem", 'padding-left': 100, 'display': 'display-inblock'},
)],
style={
'width': '90%',
'font-family': '''"PT Serif", serif''',
'margin': "1em auto 4em auto",
'position': 'relative'},
)
])
elif pathname == "/page-9":
return html.Div([
html.Div(
html.Iframe(
sandbox='',
srcDoc='''
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<style>
.myDiv {border: 5 outset red; background-color: lightblue; text-align: center;}
</style>
</head>
<body>
<div class="myDiv">
<h1> Выберите параметры проекта для старта </h1>
</div>
</body>
</html>
''',
style={'width':'95.0%',"height": '65px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'marginLeft':40, 'vertical-align':'middle'},
className="four columns instruction",
)),
html.Div([html.Label(['Информация о проектах'], style={'color': 'yellow'}),
dcc.Dropdown(id='SysInfo',
multi=False,
clearable=True,
disabled=False,
style={'display': True},
value='Кардиология)',
options=[{'label': i, 'value': i} for i in DocuList],
)
],style={'width':'99.5%',"height": '40px', 'display':'inline-block',
'overflow-y':'auto', 'color': 'black', "font-size": "1.0rem",
'marginLeft':50, 'marginRight':1, 'vertical-align':'middle',
'marginBottom':0,'marginTop':0, 'padding': '1px 1px 1px 1px'}
),
html.Div(id='container'),
])
elif pathname == "/page-10":
return html.Div([
html.Div(
html.Iframe(id="demo-explanation", src="http://localhost:8501", width=1670, height=1010),
style={'width':'99.5%',"height": '1200px','display':'inline-block',
'overflow-y':'auto', 'color': 'yellow', "font-size": "1.4rem",
'backgroundColor': 'black',
'marginLeft':40, 'marginRight':250, 'vertical-align':'middle'},
className="four columns instruction",
)
]),
return dbc.Jumbotron(
[
html.H1("404: Not found", className="text-danger"),
html.Hr(),
html.P(f"The pathname {pathname} was not recognised..."),
]
)
@app.callback(
Output("my-output", "src"),
Input("input", "value"), prevent_initial_call=True)
def update_output_div(input_value):
print(input_value)
if input_value == "C:\IPYNBgesamt2025\AsFenForum2025\ML-Reports2025.py":
RunML()
return f"assets/Asni2025Execfile.html"
elif input_value == "C:\IPYNBgesamt2025\AsFenForum2025\EDA-Report2025.py":
RunEda()
return f"assets/RunEDA-Report.html"
elif input_value == "C:\IPYNBgesamt2025\AsFenForum2025\ASNI-Reports2025.py":
print(input_value)
#execfile(r"C:\IPYNBgesamt2025\AsFenForum2025\ASNI-Reports2025.py")
return f"assets/ASNI_ReportResult2025.html"
@app.callback(Output('container', 'children'),
Input('SysInfo', 'value'))
def snapshot_page(value):
if value == 'Кардиология':
img=1
Text="Проект: Кардиология"
MDfile=Kardio
elif value == 'Диабетология':
img=1
Text="Проект: Диабетология"
MDfile=Diabet
elif value == 'Геникология':
img=1
Text="Проект: Мамография"
MDfile=Genikol
if img==0:
return html.Div([
html.Div([
html.Div(id='tabs-div', children=[image], className='tab-div'),
html.H1(children=Text, style={'color': 'white', 'textAlign': 'left', 'padding-left': 100}),
html.H1(children="x", style={'color': "#111111", 'textAlign': 'left', 'padding-left': 100, "font-size": "2.4rem", "line-height": "0.7em"}),
html.Div([dcc.Markdown(children=MDfile)], style={'color': 'yellow', "font-size": "1.4rem", 'padding-left': 100, 'display': 'display-inblock'}),
]),
])
elif img==1:
return html.Div([
html.Div([
html.H1(children=Text, style={'color': 'white', 'textAlign': 'left', 'padding-left': 100, "font-size": "2.4rem"}),
html.H1(children="x", style={'color': "#111111", 'textAlign': 'left', 'padding-left': 100, "font-size": "2.4rem", "line-height": "0.7em"}),
html.Div([dcc.Markdown(children=MDfile)], style={'color': 'yellow', "font-size": "1.4rem", 'padding-left': 100, 'display': 'display-inblock'}),
html.Br()
]),
])
if __name__ == "__main__":
app.run_server(debug=False, port=8082)